
const showNavTop = function (cname){
  let nav = document.createElement('nav');
  nav.className = `top_nav`
  nav.innerHTML = `
      <a class="${cname === 'running' ? 'active': ''}" href="./running.html">
          跑步
      </a>

      <a class="${cname === 'cycling' ? 'active': ''}"  href="./cycling.html">
          骑行
      </a>

      <a class="${cname === 'curriculum' ? 'active': ''}"  href="./curriculum.html">
          课程训练
      </a>
  `
  document.body.prepend(nav)

}

module.exports = {
  showNavTop
}